<template>
	<div id="friend-merchant-manage" class="w-h-100 pos-r flex-1 apply-container" style="box-sizing: border-box; overflow: hidden">
		<div class="w-h-100 ver-flex pos-a" style="box-sizing: border-box; padding: 6px">
			<div class="search-s page-public-s" style="box-sizing: border-box">
				<el-card shadow="never" :body-style="{ paddingBottom: '0' }">
					<el-form class="box-f" v-model="queryForm" :inline="true">
						<!-- <el-form-item label="业务类型：">
                            <el-select v-model="queryForm.BusinessType" placeholder="请选择业务类型" style="width: 100%">
                                <el-option v-for="item in options4" :key="item.value" :label="item.label"
                                    :value="item.value" />
                            </el-select>
                        </el-form-item>
                        <el-form-item label="危化品：">
                            <el-select v-model="queryForm.ChemicalId" placeholder="请选择危化品" style="width: 100%">
                                <el-option v-for="item in options1" :key="item.value" :label="item.label"
                                    :value="item.value" />
                            </el-select>
                        </el-form-item>
                        <el-form-item label="危化品名称：">
                            <el-input v-model="queryForm.ChemisName" placeholder="请输入危化品名称" />
                        </el-form-item> -->
						<el-form-item>
							<!-- <el-button @click='searchClick' icon="ele-Search" type="primary"> 查询 </el-button>
                            <el-button @click='resetClick' icon="ele-Refresh"> 重置 </el-button> -->
							<el-button v-if="$hasPer('StockRemoval1:add')" @click="nodeClick" icon="ele-Plus" type="primary"> 新增 </el-button>
							<el-button v-if="$hasPer('StockRemoval7:excel')" @click="handleExport" icon="ele-Download"> 导出数据 </el-button>
						</el-form-item>
					</el-form>
				</el-card>
			</div>

			<div style="box-sizing: border-box" class="flex-1 pos-r">
				<div class="pos-a w-h-100" style="box-sizing: border-box">
					<el-card class="box-card w-h-100" shadow="never" style="margin-top: 16px">
						<div style="" class="w-h-100 ver-flex">
							<div class="flex-1 pos-r">
								<div class="pos-a w-h-100">
									<el-table ref="excelRef" :data="list" class="w-h-100" style="width: 100%" border v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.5)">
										<el-table-column type="index" label="序号" width="55" :show-overflow-tooltip="true" align="center" :index="indexMethod" />
										<el-table-column min-width="120" :show-overflow-tooltip="true" label="业务类型" align="center">
											<el-table-column :show-overflow-tooltip="true" min-width="120" align="center">
												<template #header>
													<SearchModel typeId="value" typeVal="select" @searchHandel="searchHandel" :basicsInfo="basicsInfo" />
												</template>
												<template #default="{ row }">
													{{ row.value }}
												</template>
											</el-table-column>
										</el-table-column>
										<el-table-column min-width="120" :show-overflow-tooltip="true" label="危化品名称" align="center">
											<el-table-column min-width="120" :show-overflow-tooltip="true" align="center">
												<template #header>
													<SearchModel typeId="name" typeVal="input" @searchHandel="searchHandel" :basicsInfo="basicsInfo" />
												</template>
												<template #default="{ row }">
													{{ row.name }}
												</template>
											</el-table-column>
										</el-table-column>
										<el-table-column min-width="90" :show-overflow-tooltip="true" label="仓管员姓名1" prop="empName" align="center" />
										<el-table-column min-width="90" :show-overflow-tooltip="true" label="仓管员姓名2" prop="empName2" align="center" />

										<el-table-column min-width="60" :show-overflow-tooltip="true" prop="inOrOut" label="状态" align="center">
											<template #default="scope">
												<span v-if="scope.row.inOrOut == 1">在库</span>
												<span v-else>出库</span>
											</template>
										</el-table-column>
										<el-table-column min-width="120" :show-overflow-tooltip="true" prop="boundOrderId" label="出库单号" align="center" />
										<el-table-column min-width="80" :show-overflow-tooltip="true" prop="productBatchId" label="产品批号" align="center" />
										<el-table-column min-width="80" :show-overflow-tooltip="true" prop="outBoundQuantity" label="出库数量" align="center" />
										<el-table-column min-width="120" :show-overflow-tooltip="true" prop="locationDetailName" label="存储位置" align="center" />
										<el-table-column min-width="100" :show-overflow-tooltip="true" prop="boundDate" label="出库日期" align="center" :formatter="formatDate" />
										<el-table-column min-width="180" label="操作" align="center" fixed="right">
											<el-table-column min-width="180" align="center">
												<template #header>
													<el-button @click="searchClick" icon="ele-Search" type="primary" text> 查询 </el-button>
													<el-button @click="resetClick" icon="ele-Refresh" text> 重置 </el-button>
												</template>
												<template #default="scope">
													<div class="operate-s">
														<el-button v-if="$hasPer('StockRemoval2:edit')" @click="nodeClick(scope.row)" class="icon-e" icon="ele-Edit" size="small" text type="primary"> 编辑 </el-button>
														<el-button v-if="$hasPer('StockRemoval3:delete')" @click="deleteHandle(scope.row.n_Id, getData)" class="icon-e" icon="ele-Delete" size="small" text type="danger">
															删除
														</el-button>
													</div>
												</template>
											</el-table-column>
										</el-table-column>
									</el-table>
								</div>
							</div>
							<div style="height: 30px; margin-top: 20px" class="hr-flex-start">
								<el-pagination
									v-model:currentPage="pageNo"
									v-model:page-size="pageSize"
									:total="totalRows"
									:page-sizes="[10, 20, 50, 100]"
									small
									background
									@size-change="handleSizeChange"
									@current-change="handleCurrentChange"
									layout="total, sizes, prev, pager, next, jumper"
									class="w-h-100"
								/>
							</div>
						</div>
					</el-card>
				</div>
			</div>
		</div>
		<!-- 新增and编辑 -->
		<el-dialog v-model="showDialogVisible" :title="saveId ? '编辑' : '新增'" width="50%" @close="cancelUseClick">
			<el-form label-width="80px" ref="ruleFormRef" :model="ruleForm" size="default" :rules="rules">
				<el-divider content-position="left"> 基本信息 </el-divider>
				<el-row :gutter="35">
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="boundOrderId" label="出库订单id">
							<el-input v-model="ruleForm.boundOrderId" disabled placeholder="请选择出库订单id" clearable />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="businessTypeName" label="业务类型">
							<el-select v-model="ruleForm.businessType" placeholder="请选择业务类型" style="width: 100%">
								<el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value" />
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="BoundDate" label="出库日期">
							<el-date-picker style="width: 100%" format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="ruleForm.BoundDate" type="date" placeholder="请选择变更日期" />
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="warehouseAdministratorId" label="仓管员1">
							<el-select v-model="ruleForm.warehouseAdministratorId" placeholder="请选择仓管员1" style="width: 100%">
								<el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value" />
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="warehouseAdministrator2Id" label="仓管员2">
							<el-select v-model="ruleForm.warehouseAdministrator2Id" placeholder="请选择仓管员2" style="width: 100%">
								<el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value" />
							</el-select>
						</el-form-item>
					</el-col>
					<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="productBatchId" label="产品批号">
							<el-input v-model="ruleForm.productBatchId" placeholder="请选择产品批号" clearable />
						</el-form-item>
					</el-col> -->
					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
						<el-form-item prop="chemicalId" label="危化品">
							<el-select v-model="ruleForm.chemicalId" placeholder="请选择危化品" style="width: 100%" @change="changeChemical">
								<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-divider v-if="outBoundDataList.length > 0" content-position="left"> 出库信息 </el-divider>
					<el-table v-if="outBoundDataList.length > 0" :data="outBoundDataList" border style="width: 100%;">
						<el-table-column align="center" type="index" label="序号" min-width="60" :show-overflow-tooltip="true" />
						<el-table-column align="center" prop="productBatchId" label="产品批号" min-width="100" :show-overflow-tooltip="true" />
						<el-table-column align="center" prop="quantity" label="库存数量" min-width="100" :show-overflow-tooltip="true" />
						<el-table-column align="center" prop="outBoundQuantity" label="出库数量" width="200">
							<template #default="{ row }">
								<!-- <el-input type="number" v-model="row.outBoundQuantity"  clearable /> -->
								<el-input-number v-model="row.outBoundQuantity" placeholder="请输入出库数量" :min="0" :max="999999999999999999" style="width: 100%;" />
							</template>
						</el-table-column>
						<!-- <el-table-column align="center" prop="boundDate" label="变更日期" min-width="120" :show-overflow-tooltip="true" /> -->
						<el-table-column align="center" prop="locationName" label="存储位置" min-width="120" :show-overflow-tooltip="true" />
					</el-table>
			</el-form>

			<template #footer>
				<span class="dialog-footer">
					<el-button @click="cancelUseClick">取消</el-button>
					<el-button type="primary" @click="controlUseClick(ruleFormRef, getData)">确定</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>

<script lang="ts">
import { defineComponent, ref, onMounted, reactive } from 'vue';
import getTableData from '/@/utils/getTableData';
import { ElMessageBox, ElMessage, FormInstance, dayjs } from 'element-plus';
// import {
//     getStocksDangerousChemicalsInApi, deleteStocksDangerousChemicalsInApi, addStocksDangerousChemicalsInApi,
//     getStorageLocationApi, queryStocksDangerousChemicalsInApi1, updateStocksDangerousChemicalsInApi, queryStocksDangerousChemicalsInApi,
//     getParentAreaApi
// } from "/@/api/sms/HazardousChemicalsInterface"
import { exportToExcel } from '/@/utils/exportToExcel';
import {
	getStocksDangerousChemicalsInApi,
	deleteStocksDangerousChemicalsInApi,
	addStocksDangerousChemicalsInApi,
	queryStocksDangerousChemicalsInApi1,
	updateStocksDangerousChemicalsInApi,
	queryStocksDangerousChemicalsInApi,
	getParentAreaApi,
	getChemicalsCargoManagerApi,
	getChemicalsOutApi,
} from '/@/api/sms/HazardousChemicalsInterface';
import { sysDictDataList } from '/@/api/centerControl/pubilc';
import SearchModel from '/@/views/sms/component/search-model.vue';
// import { Local } from '/@/utils/storage';
// import { accessTokenKey } from '/@/utils/axios-utils';
export default defineComponent({
	components: {
		SearchModel,
	},
	setup() {
		/***** 变量 *****/
		let searchObj: any = reactive({
			InOrOut: 2,
		});
		const transferVal = ref(); // 需要查询的值
		const showDialogVisible = ref(false);
		const ruleForm = reactive({
			chemicalId: '', //危化品id
			BoundDate: '', //变更库日期
			warehouseAdministratorId: '', // 仓管员id
			warehouseAdministrator2Id: '', // 仓管员id
			businessType: '', //业务类型
			inOrOut: 2,
			productBatchId: '',//产品批号
			boundOrderId: 0, //出库订单id
		});

		const queryForm = reactive({
			BusinessType: null,
			ChemisName: '',
			ChemicalId: null,
		});

		const resetClick = () => {
			searInfo.value = {};
			let newObj = Object.keys(searchObj);
			if (newObj.length !== 0) {
				newObj.map((i: any) => {
					searchObj[i] = '';
					// console.log(i);
				});
			}
			initInfoFun();
		};
		// function authenticatedFetch(url: any, options: any = {}) {
		//     const accessToken = Local.get(accessTokenKey);
		//     const headers = new Headers(options.headers || {});
		//     headers.set('Authorization', `Bearer ${accessToken}`); // 这里假设是Bearer类型的token

		//     const fetchOptions = {
		//         ...options,
		//         headers,
		//     };

		//     return fetch(url, fetchOptions)
		//         .then(response => {
		//             if (!response.ok) {
		//                 throw new Error(`Request failed with status: ${response.status}`);
		//             }
		//             return response.json();
		//         })
		//         .catch(error => {
		//             console.error('Authenticated fetch error:', error);
		//             throw error;
		//         });
		// }

		const ruleFormRef = ref();
		const rules: any = reactive({
			chemicalId: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			BoundDate: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			warehouseAdministratorId: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			warehouseAdministrator2Id: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
			// outBoundQuantity: [
			// 	{ required: true, message: '内容不能为空', trigger: 'blur' },
			// 	{ pattern: /^[1-9]\d*$/, message: '请输入数字', trigger: 'blur' },
			// ],
			businessType: [{ required: true, message: '内容不能为空', trigger: 'blur' }],
		});

		/***** searchClick 查询按钮 *****/
		const searchClick = () => {
			let newObj = Object.keys(searInfo.value);
			if (newObj.length !== 0) {
				newObj.map((i: any) => {
					searchObj[i] = searInfo.value[i];
				});
			}
		};

		/*** nodeClick 新增/编辑点击事件 */
		const options4: any = ref([]);
		const options3: any = ref([]);
		const options1: any = ref([]);
		const saveId = ref();
		const nodeClick = async (obj: any) => {
			console.log(obj);

			if (obj.n_Id) {
				saveId.value = obj.n_Id;

				ruleForm.chemicalId = obj.chemicalId;
				ruleForm.BoundDate = dayjs(obj.BoundDate).format('YYYY-MM-DD');
				ruleForm.warehouseAdministratorId = obj.warehouseAdministratorId;
				ruleForm.warehouseAdministrator2Id = obj.warehouseAdministrator2Id;
				ruleForm.productBatchId = obj.productBatchId;
				ruleForm.businessType = obj.businessType;
				ruleForm.boundOrderId = obj.boundOrderId;
				outBoundDataList.value = [];
				const res = await getChemicalsOutApi({ chemicalId: obj.chemicalId });
				outBoundDataList.value = res.data;
			} else {
				queryStocksDangerousChemicalsInApi().then((res: any) => {
					console.log(res);
					ruleForm.boundOrderId = res.data;
				});
			}
			showDialogVisible.value = true;
		};

		/*** cancelUseClick 取消事件 */
		const cancelUseClick = () => {
			ruleFormRef.value?.clearValidate();
			showDialogVisible.value = false;
			ruleForm.chemicalId = '';
			ruleForm.BoundDate = '';
			ruleForm.warehouseAdministratorId = '';
			ruleForm.warehouseAdministrator2Id = '';
			ruleForm.productBatchId = '',
			ruleForm.businessType = '';
			ruleForm.inOrOut = 2;
			saveId.value = '';
			ruleForm.boundOrderId = 0; //出库订单id
			outBoundDataList.value = [];
		};

		const options2: any = ref([]);
		// const changeFun1 = (val: number) => {
		// 	options2.value = [];
		// 	dataTree.value.forEach((item: any) => {
		// 		if (item.n_Id === val) {
		// 			ruleForm.providerId = item.providerId;
		// 			if (item.regions.length) {
		// 				item.regions.forEach((i: any) => {
		// 					options2.value.push({
		// 						label: i.locationName,
		// 						value: i.region,
		// 					});
		// 				});
		// 			} else {
		// 				options2.value = [];
		// 			}
		// 		}
		// 	});
		// };
		// const changeFun3 = (val: number) => {
		//     ruleForm.providerId = val;
		// }
		// const changeFun4 = (val: number) => {
		//     ruleForm.businessType = val;
		// }

		/*** controlUseClick 提交事件 */
		const controlUseClick = async (formEl: FormInstance | undefined, updateFun: Function) => {
			if (!formEl) return;
			await formEl.validate((valid, fields) => {
				if (valid) {
					console.log('submit!');
					if (saveId.value) {
						const obj = Object.assign({ ...ruleForm, id: saveId.value });
						updateStocksDangerousChemicalsInApi(obj).then((res) => {
							cancelUseClick();
							updateFun();
						});
					} else {
						const stockDatas = (outBoundDataList.value || []).filter((item: any) =>  item.outBoundQuantity != 0) || [];
						addStocksDangerousChemicalsInApi({ ...ruleForm,  stockDatas }).then((res) => {
							cancelUseClick();
							updateFun();
						});
					}
				} else {
					console.log('error submit!', fields);
				}
			});
		};

		/*** deleteHandle 删除数据事件 */
		const deleteHandle = async (val: String | Number, updateFun: Function) => {
			ElMessageBox.confirm('请确定删除此条数据', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning',
			})
				.then(async () => {
					let param = { id: val };
					try {
						let res: any = await deleteStocksDangerousChemicalsInApi(param);
						if (res.success) {
							updateFun();
						}
					} catch (err) {
						return;
					}
				})
				.catch(() => {
					ElMessage({
						type: 'info',
						message: '删除失败',
					});
				});
		};

		const outBoundDataList: any = ref([]);
		const changeChemical = async (id: Number) => {
			console.log(id);
			const res = await getChemicalsOutApi({ chemicalId: id });
			outBoundDataList.value = res.data;
		};

		/*** 初始化数据 */
		const basicsInfo: any = ref([]);
		const initInfoFun = () => {
			basicsInfo.value = [
				{
					typeId: 'value', // 类型(不能为空，且唯一，与组件中typeId值对应) --- 必填
					typeNam: '', // 输入类型(number,text等) --- 选填
					searchVal: 'BusinessType', // 查询字段 --- 必填
					defaultVal: '', // 字段默认值 --- 选填
					placeholder: '业务类型', // placeholder数据
					defaultProp: options4.value, // 下拉框中使用，除下拉框外其它情况为空 --- 选填
					eventType: '', // 事件类型（如burl/change等） --- 选填
					defaultEvent: '', // 事件名称 --- 选填
				},
				{
					typeId: 'name', // 类型(不能为空，且唯一，与组件中typeId值对应) --- 必填
					typeNam: '', // 输入类型(number,text等) --- 选填
					searchVal: 'ChemisName', // 查询字段 --- 必填
					defaultVal: '', // 字段默认值 --- 选填
					placeholder: '危化品名称', // placeholder数据
					defaultProp: '', // 下拉框中使用，除下拉框外其它情况为空 --- 选填
					eventType: '', // 事件类型（如burl/change等） --- 选填
					defaultEvent: '', // 事件名称 --- 选填
				},
				// {
				// 	typeId: 'warehouseAdministrator', // 类型(不能为空，且唯一，与组件中typeId值对应) --- 必填
				// 	typeNam: '', // 输入类型(number,text等) --- 选填
				// 	searchVal: 'WarehouseAdministrator', // 查询字段 --- 必填
				// 	defaultVal: '', // 字段默认值 --- 选填
				// 	placeholder: '仓管员姓名', // placeholder数据
				// 	defaultProp: '', // 下拉框中使用，除下拉框外其它情况为空 --- 选填
				// 	eventType: '', // 事件类型（如burl/change等） --- 选填
				// 	defaultEvent: '', // 事件名称 --- 选填
				// },
				{
					typeId: 'v_ProvideName', // 类型(不能为空，且唯一，与组件中typeId值对应) --- 必填
					typeNam: '', // 输入类型(number,text等) --- 选填
					searchVal: 'ProviderName', // 查询字段 --- 必填
					defaultVal: '', // 字段默认值 --- 选填
					placeholder: '友商名称', // placeholder数据
					defaultProp: '', // 下拉框中使用，除下拉框外其它情况为空 --- 选填
					eventType: '', // 事件类型（如burl/change等） --- 选填
					defaultEvent: '', // 事件名称 --- 选填
				},
			];
		};

		const searInfo: any = ref();
		const searchHandel = (val: any) => {
			searInfo.value = val;
		};

		let dataTree: any = ref([]);
		const options5: any = ref([]);
		onMounted(async () => {
			// 获取字典4
			const res4 = await sysDictDataList({ TypeCode: 'OutBound_BusinessType' });
			res4.data.forEach((element: any) => {
				options4.value.push({ label: element.value, value: element.id });
			});
			// 获取危化品1
			const res1 = await queryStocksDangerousChemicalsInApi1();
			dataTree.value = res1.data;
			res1.data.forEach((element: any) => {
				options1.value.push({ label: element.name, value: element.n_Id });
			});

			await initInfoFun();

			const res5 = await getChemicalsCargoManagerApi({ PosCode: 'WHPCGY' });
			options5.value = res5.data.map((item: any) => {
				return {
					label: item.name,
					value: item.id,
				};
			});
		});

		/*** 截取日期格式方法 */
		const formatDate = (row: any, column: any) => {
			// 获取单元格数据
			let data = row[column.property];
			if (data == null) {
				return '-';
			}
			if (data === '1900-01-01 00:00:00') {
				return '-';
			}
			let dt = new Date(data);
			let month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
			let date = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
			return dt.getFullYear() + '-' + month + '-' + date;
		};

		/*** ================================= 导出数据函数操作 ================================= */
		const excelRef: any = ref(null);
		const handleExport = () => {
			if (excelRef.value) {
				if (excelRef.value.data.length !== 0) {
					let tableExcel: any = [];
					let tableArr = excelRef.value.data;
					tableArr.map((item: any) => {
						let tableObj: any = {};
						tableObj['业务类型'] = item.value ? item.value : '-';
						tableObj['危化品名称'] = item.name ? item.name : '-';
						tableObj['友商名称'] = item.v_ProvideName ? item.v_ProvideName : '-';
						tableObj['仓管员姓名1'] = item.empName ? item.empName : '-';
						tableObj['仓管员姓名2'] = item.empName2 ? item.empName2 : '-';
						tableObj['状态'] = item.inOrOut == 1 ? '在库' : '出库';
						tableObj['出库单号'] = item.boundOrderId ? item.boundOrderId : '-';

						tableObj['产品批号'] = item.productBatchId ? item.productBatchId : '-';
						tableObj['出库数量'] = item.outBoundQuantity ? item.outBoundQuantity : '-';
						tableObj['存储位置'] = item.locationDetailName ? item.locationDetailName : '-';
						tableObj['出库日期'] = item.boundDate ? item.boundDate : '-';

						tableObj['创建人'] = item.createdUserName ? item.createdUserName : '-';
						tableObj['创建时间'] = item.createdTime ? item.createdTime : '-';
						tableObj['更新人'] = item.updatedUserName ? item.updatedUserName : '-';
						tableObj['更新时间'] = item.updatedTime ? item.updatedTime : '-';
						tableExcel.push(tableObj);
					});
					exportToExcel(tableExcel, '危化品出库.xlsx');
				} else {
					ElMessage({
						type: 'error',
						message: '暂无数据导出',
					});
				}
			}
		};

		return {
			...getTableData(getStocksDangerousChemicalsInApi, {}, searchObj),
			cancelUseClick,
			controlUseClick,
			nodeClick,
			deleteHandle,
			searchClick,
			transferVal,
			/***/
			showDialogVisible,
			ruleForm,
			options1,
			options2,
			saveId,
			rules,
			options4,
			options3,
			ruleFormRef,
			queryForm,
			resetClick,
			dataTree,
			// changeFun1,
			// changeFun3,
			// changeFun4,
			searchHandel,
			basicsInfo,
			formatDate,
			handleExport,
			excelRef,
			options5,
			changeChemical,
			outBoundDataList,
		};
	},
});
</script>

<style lang="scss">
@import '../style/public.scss';
</style>

<style scoped lang="scss">
#friend-merchant-manage {
	.box-f {
		:deep(.el-form-item__label) {
			padding: 0;
		}
	}

	:deep(.el-card__body) {
		height: 100%;
	}

	:deep(.el-card) {
		border: none !important;
	}

	.upload-demo {
		margin-left: 12px;
		margin-top: 2px;
	}

	ul {
		list-style: none;

		li {
			cursor: pointer;

			&:hover {
				color: red;
			}
		}
	}

	.icon-e {
		:deep(.el-icon) {
			margin-right: 0px !important;
		}
	}
}
</style>
